/**
 * 全局配置信息， 包含网站标题，  动态组件定义
 *
 * @author will
 * @site https://pt.jdyd.xyz
 * @date 2021/5/8 07:18
 */

/** 应用配置项 **/
export default {
  APP_TITLE: '营销运营平台', // 设置浏览器title
  ACCESS_TOKEN_NAME: 'iToken', // 设置请求token的名字， 用于请求header 和 localstorage中存在名称
  ACCESS_VERSION: 'version', // 设置请求token的名字， 用于请求header 和 localstorage中存在名称
}


let App


/**
 * 与后端开发人员的路由名称及配置项
 * 组件名称 ：{ 默认跳转路径（如果后端配置则已动态配置为准）， 组件渲染 }
 * */
export const asyncRouteDefine = {
  /**
   * 其他菜单MO
   */
  'CurrentUserInfo': { defaultPath: '/current/userinfo', component: () => import('@/views/current/UserinfoPage.vue')  }, // 用户设置
  /**
   * 系统管理
   */
  // 用户角色管理
  'SysUserPage': { defaultPath: '/users', component: () => import('@/views/sysManage/userRoleManage/operatorManage/SysUserPage.vue')  },  // 操作员
  'RolePage': { defaultPath: '/roles', component: () => import('@/views/sysManage/userRoleManage/roleManage/RolePage.vue')  },  // 角色
  'EntPage': { defaultPath: '/ents', component: () => import('@/views/sysManage/userRoleManage/ent/EntPage.vue')  },  //权限管理
  'SysConfigPage': { defaultPath: '/config', component: () => import('@/views/sysManage/sysConfig/SysConfig.vue')  }, // 系统配置
  'SysLogPage': { defaultPath: '/log', component: () => import('@/views/sysManage/syslog/SysLog.vue')  }, // 系统日志
  'SysTaskLogPage': { defaultPath: '/taskLog', component: () => import('@/views/sysManage/taskLog/taskLog.vue')  }, // 定时任务
  // QA管理
  'SysQaPage': { defaultPath: '/sys/qa', component: () => import('@/views/sysManage/qaManage/qaList/List.vue')  }, // 问答管理
  'SysQaTypePage': { defaultPath: '/sys/qatype', component: () => import('@/views/sysManage/qaManage/qaType/List.vue')  }, // 问答管理
  /**
   * 主页
   */
  'MainPage': { defaultPath: '/main', component: () => import('@/views/dashboard/Analysis.vue')  },
  /**
   * 商户管理
   */
  'MchListPage': { defaultPath: '/mch/list', component: () => import('@/views/mch/MchList.vue')  }, // 商户列表
  'MchGroupPage': { default: '/mch/group', component: () => import('@/views/mch/businessCircle/businessCircleList/List.vue') }, // 商圈管理
  /**
   * 机构列表
   */
  'ProxyListPage': { defaultPath: '/agent/list', component: () => import('@/views/proxy/ProxyList.vue')  }, // 机构列表
  'ProxyEmployeePage': { defaultPath: '/agent/employee', component: () => import('@/views/proxy/ProxyEmployee.vue')  }, // 机构人员管理
  // 'ProxyAccount': { defaultPath: '/proxy/employee', component: () => import('@/views/proxy/accountMange/index.vue')  }, // 账户管理
  // 小程序管理
  'AppletListPage': { defaultPath: '/applet/list', component: () => import('@/views/proxy/lite/List.vue')  }, // 机构小程序管理
  'AppletBannerPage': { default: '/applet/banner', component: () => import('@/views/proxy/lite/liteBanner/List.vue') },  // 小程序Banner配置
  // 公众号管理
  'MpListPage': { defaultPath: '/mp/list', component: () => import('@/views/proxy/officialAccount/proxyOfficial/OfficialList.vue') },// 机构公众号管理
  'MpMaterialPage': { default: '/mp/material', component: () => import('@/views/proxy/officialAccount/material/Material.vue') },  // 素材管理
  'MpMenuPage': { default: '/mp/menu', component: () => import('@/views/proxy/officialAccount/menu/Menu.vue') },  // 菜单管理
  'MpReplyPage': { default: '/mp/reply', component: () => import('@/views/proxy/officialAccount/autoReply/AutoReply.vue') },  // 消息回复
  // 'AdvertisingList': { defaultPath: '/advertising', component: () => import('@/views/proxy/advertising/List.vue')  }, // 广告位管理
  /**
   * 渠道管理
   */
  'ChnnelMchPage': { defaultPath: '/channel/mch', component: () => import('@/views/channel/merchant/index.vue')  }, // 商户渠道
  'ChnnelEmployeesPage': { defaultPath: '/channel/employees', component: () => import('@/views/channel/employees/index.vue')  }, // 机构员工渠道
  'ChnnelOutletsPage': { defaultPath: '/channel/outlets', component: () => import('@/views/channel/outlets/index.vue')  }, // 机构网点渠道
  'ChnnelSelfPage': { defaultPath: '/channel/self', component: () => import('@/views/channel/selfBuilt/index.vue')  }, // 自建渠道
  // 'OtherChannelPage': { defaultPath: '/other/channel', component: () => import('@/views/proxy/otherChannel/index.vue')  }, // 其他渠道码管理
  // 'MchChannelPage': { defaultPath: '/mch/channel', component: () => import('@/views/mch/MchChannelList.vue')  }, // 商户通道
  /**
   * 虚拟商品管理
   */
  'VirtualSupplierPage': { default: '/vitual/supplier', component: () => import('@/views/externalGoods/supplier/index.vue') },  // 供应商管理
  'VirtualOuterPage': { default: '/vitual/outer', component: () => import('@/views/externalGoods/outsidetable/index.vue') },  // 外部商品管理
  'VirtualInnerPage': { default: '/vitual/inner', component: () => import('@/views/externalGoods/innertable/index.vue') },  // 内部商品管理
  'VirtualCdkPage': { default: '/vitual/cdk', component: () => import('@/views/externalGoods/CDK/index.vue') },  // CDK管理
  /**
   * 奖品管理
   */
  'AwardGoodsPage': { default: '/award/goods', component: () => import('@/views/award/goods/List.vue') },  // 实物奖品
  'AwardCouponPage': { default: '/award/coupon', component: () => import('@/views/award/coupon/List.vue') },  // 卡券奖品
  'AwardVirtualPage': { default: '/award/virtual', component: () => import('@/views/award/virtualCoupon/List.vue') },  // 虚拟券奖品
  'AwardScorePage': { default: '/award/score', component: () => import('@/views/award/score/List.vue') },  // 福分商品
  /**
   * 活动管理
   */
  'ActivityTypePage': { default: '/activity/type', component: () => import('@/views/activity/activityType/List.vue') },  // 活动类型
  'ActivityTemplatePage': { default: '/activity/template', component: () => import('@/views/activity/activityTemplate/List.vue') },  // 活动模板
  'ActivityExaminePage':{ default: 'activity/examine', component: () => import('@/views/activity/activityExamine/ActivityExamine.vue') },  // 审批管理
  'ActivityMaterialPage': { default: '/activity/material', component: () => import('@/views/activity/activityMaterial/List.vue') },  // 活动素材
  'ActivityIfcodePage': { default: '/ifcode', component: () => import('@/views/activity/ifCode/List.vue') },  // 通道管理
  'ActivityListIssuePage': { default: '/activity/issue', component: () => import('@/views/activity/activityList/List.vue') },  // 扫码派券
  'ActivityListGetPage': { default: '/activity/get', component: () => import('@/views/activity/activityList/List.vue') },  // 扫码领券
  'ActivityListOtherPage': { default: '/activity/other', component: () => import('@/views/activity/activityList/List.vue') },  // 其他活动
  /**
   * 福分管理
   */
  'ScoreRulePage': { default: '/score/rule', component: () => import('@/views/score/scoreRule/List.vue') },  // 福分规则
  'ScoreMallPage': { default: '/score/mall', component: () => import('@/views/score/scoreMall/List.vue') },  // 福分商城
  'ScoreEquityPage': { default: '/score/equity', component: () => import('@/views/score/scoreInterest/List.vue') },  // 权益商城
  // 'ScoreExchange': { default: '/score/exchange', component: () => import('@/views/score/scoreExchange/List.vue') },  // 兑换记录
  /**
   * 用户管理
   */
  'ClientListPage': { default: '/client/list', component: () => import('@/views/fans/fansList/List.vue') },  // 用户列表
  'ClientMchPage': { default: '/client/mch', component: () => import('@/views/fans/fansCertifiedmch/List.vue') },  // 认证商户列表
  // 'FansActivity': { default: '/fans/activity', component: () => import('@/views/fans/fansActivity/List.vue') },  // 参与活动记录
  // 'FansAward': { default: '/fans/award', component: () => import('@/views/fans/fansAward/List.vue') },  // 获奖记录
  'ClientFeedbackPage': { default: '/client/feedback', component: () => import('@/views/fans/userComplain/List.vue') },  // 用户反馈
  /**
  * 数据报表
  */
  // 实名认证明细
  'ReportAuthPage': { default: '/report/auth', component: () => import('@/views/dataReports/realNameTable/index.vue') },  // 实名认证明细表
  // 会员通报表
  'ReportMemberAllPage': { default: '/report/member/all', component: () => import('@/views/dataReports/memberNotic/allFansInfo.vue') },  // 全量用户明细表
  'ReportMemberOldPage': { default: '/report/member/old', component: () => import('@/views/dataReports/memberNotic/oldFansInfo.vue') },  // 存量用户明细表
  'ReportMemberAgentPage': { default: '/report/member/agent', component: () => import('@/views/dataReports/memberNotic/agentFansInfo.vue') },  // 机构会员明细表
  'ReportMemberDevPage': { default: '/report/member/dev', component: () => import('@/views/dataReports/memberNotic/fansDevelopInfo.vue') },  // 会员发展明细表
  // 福利焕活
  'ReportWelfareTakePage': { default: '/report/welfare/take', component: () => import('@/views/dataReports/welfareRevitalize/userDetail/index.vue') }, // 用户参与明细记录
  'ReportWelfareRecallPage': { default: '/report/welfare/recall', component: () => import('@/views/dataReports/welfareRevitalize/recallDetail/index.vue') }, // 会员召回情况明细表
  'ReportWelfareAgentPage': { default: '/report/welfare/agent', component: () => import('@/views/dataReports/welfareRevitalize/agentDetail/index.vue') }, // 机构会员明细表
  // 福分使用情况
  'ReportScoreUsePage': { default: '/report/score/use', component: () => import('@/views/dataReports/goodsUse/goodsUseDeatil/index.vue') }, // 福分使用情况
  'ReportScoreActionPage': { default: '/report/score/action', component: () => import('@/views/dataReports/goodsUse/pointsDetails/index.vue') }, // 积分动作明细表
  /**
   * 限制条件
   */
  'BlackRulePage': { default: '/black/rule', component: () => import('@/views/blacklist/rule/index.vue') },  // 黑名单规则
  'BlackListPage': { default: '/black/list', component: () => import('@/views/blacklist/list/index.vue') },  // 黑名单列表
  /**
   * 下载管理
   */
  'DownloadListPage':{ default: '/download/list', component: () => import('@/views/DownLoad/index.vue') },  // 下载管理
  /**
   * 运营工具
   */
  'OperToolPage': { default: '/oper/tool', component: () => import('@/views/operateTool/index.vue') }, // 运营工具页面
}


export function getGlobalApp(){
  return App
}

export function setGlobalApp(app){
  App = app
}